package progress.exa31_2;


import javax.swing.*;
import java.awt.*;
import java.util.Date;

public class LambdaStudy {
    public static void main(String[] args) throws InterruptedException {
        Timer t = new Timer(1000, event->{
            System.out.println("At the tone,the time is"+new Date());
            Toolkit.getDefaultToolkit().beep();
        });
        t.start();
        JOptionPane.showMessageDialog(null,"要退出吗?");
        System.exit(0);

    }
}
